<?php
namespace app\admin\Validate;

use think\Validate;

class Goods  extends  Validate
{
    protected $rule = [
        'goods_name'  =>  'require|unique:goods',
        'category_id'  =>  'require',
        'markte_price'  =>'require|number',
        'shop_price'  =>  'require|number',
        'goods_weight'  =>  'require|number',


    ];

    protected $message = [
        'goods_name.require'  =>  '商品名称必须填写',
        'goods_name.unique'  =>  '商品名称不能重复',
        'category_id.require'  =>  '商品所属栏目必须填写',
        'markte_price.require'  =>  '商品市场价格必须填写',
        'markte_price.number'  =>  '商品市场价格必须为数字',
        'shop_price.require'  =>  '商品本店价格必须填写',
        'shop_price.number'  =>  '商品本店价格必须为数字',
        'goods_weight.require'  =>  '商品重量必须填写',
        'goods_weight.number'  =>  '商品重量必须为数字',


    ];


}
